package com.human.service.impl;

import com.human.entity.Position;
import com.human.dao.PositionMapper;
import com.human.entity.ResultVo;
import com.human.service.IPositionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 职位 服务实现类
 * </p>
 *
 * @author jzq
 * @since 2023-02-28
 */
@Service
public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> implements IPositionService {

    @Resource
    PositionMapper positionMapper;

    @Override
    public ResultVo getAllPosition() {
        List<Position> positionList = positionMapper.selectList(null);
        return new ResultVo<>(true, "查询成功", positionList);
    }

    @Override
    public ResultVo getPosPersonNum() {
        List<Position> posPersonNum = positionMapper.getPosPersonNum();
        return new ResultVo<>(true, "查询成功", posPersonNum);
    }

}
